Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Implement Hermite normal form and associated methods #44

Merged
merged 1 commit into from
Jul 3, 2024
Merged

Conversation

frostburn
Copy link
Member

ref #43

@frostburn frostburn force-pushed the hnf branch 2 times, most recently from 2a00921 to 9ccfc8d Compare June 30, 2024 15:46
@frostburn
Copy link
Member Author

Seems OK, but let's see that this is enough to add temperaments to sonic-weave first.

src/basis.ts Outdated
commas: Monzo[],
commaOrthoDuals?: Monzo[]
) {
return sub(monzo, nearestPlane(monzo, commas, commaOrthoDuals));
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Saves a sub if the body is swapped with nearestPlane.

A: number[][],
b: number[] | number[][]
): typeof b {
const hasMultiple = Array.isArray(b[0]);
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The implementation is a bit messy. Just promote the vector to a matrix.

@frostburn frostburn merged commit 0eeaeb2 into main Jul 3, 2024
1 check passed
@frostburn frostburn deleted the hnf branch July 3, 2024 10:55
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant